Skip to main content

Error Handling

All SDK calls return Promises, so the usual try/await/catch works.

Ensure you have added the onGiftmeReady helper from the Installation page.

window.onGiftmeReady(async ({ giftmeMakePayment }) => {
try {
await giftmeMakePayment({ orderToken: 'ORDER_TOKEN' });
} catch (err) {
console.error('Payment failed:', err);
// fall back to card form, show toast, etc.
}
});